package com.iot.north.app.demo.exception;

import lombok.Getter;
import lombok.Setter;


public class BaseException extends RuntimeException {

  @Getter @Setter private ResultCode code;

  public BaseException(ResultCode code) {
    this(code, code.getMsg());
  }

  public BaseException(ResultCode code, String msg) {
    super(msg);
    this.code = code;
  }

  public BaseException(ResultCode code, Throwable cause) {
    super(code.getMsg(), cause);
    this.code = code;
  }
}
